$.ajaxSetup( {
//设置ajax请求结束后的执行动作
complete : 
function(XMLHttpRequest, textStatus) {
// 通过XMLHttpRequest取得响应头，sessionstatus
var sessionstatus = XMLHttpRequest.getResponseHeader("REDIRECT");
if (sessionstatus == "REDIRECT") {
var win = window;
while (win != win.top){
win = win.top;
}
layer.msg("登陆失效请重新登陆");
setTimeout(function () {
	win.location.href= XMLHttpRequest.getResponseHeader("CONTENTPATH");
}, 1500);

}
}
});